package datastructure.priorityqueue;

/**
 * 优先级队列的元素
 *
 * @author 杨 强
 * @package datastructure.priorityqueue
 * @createTime 2023-03-16 21:52
 */
public class Element implements Priority {

    /**
     * 元素数据
     */
    Object data;
    /**
     * 元素优先级
     */
    int priority;

    public Element(Object data, int priority) {
        this.data = data;
        this.priority = priority;
    }

    @Override
    public int priority() {
        return priority;
    }
}
